package de.lmu.ifi.pst.uwejsf.framework.process;

import de.lmu.ifi.pst.uwejsf.framework.AbstractUWENavigator;
import de.lmu.ifi.pst.uwejsf.framework.ViewInfo;


public abstract class CallProcessAction extends Action {


	public CallProcessAction(ProcessActivityBean activity) {
		super(activity);
	}

	@Override
	public void populateInputValues(Object bean) {
		throw new ProcessDataflowException(
				"Can't populate input values for CallProcessAction!");

	}

	public void setInputValue(String name, Object value) {
		getCalledActivity().setInputParameter(value);
	}
	
	public String execute() {
		ViewInfo currentView = AbstractUWENavigator.getNavigator().getCurrentView();
		return getCalledActivity().start(currentView, activity);
		
	
	}
	
	public abstract void storeResultValues(java.util.Map<String, Object> result);
	
	public abstract ProcessActivityBean getCalledActivity();

}
